package com.derbysoft.lowcostadapter.web.action.model;

import com.derbysoft.lowcostadapter.commons.exception.InputErrorException;
import org.apache.commons.lang.StringUtils;

/**
 * Created by: jason
 * Date: 2012-09-26
 */
public class HotelCondition {
    private String propertyId;
    private String passport;

    public String getPropertyId() {
        return propertyId;
    }

    public void setPropertyId(String propertyId) {
        this.propertyId = propertyId;
    }

    public String getPassport() {
        return passport;
    }

    public void setPassport(String passport) {
        this.passport = passport;
    }

    public void validate() {
        if (StringUtils.isBlank(propertyId) && StringUtils.isBlank(passport)) {
            throw new InputErrorException("Required fields can not be empty !");
        }
    }
}
